{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Phase/Orientation Mapping" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This tutorial demonstrates how to achieve phase and orientation mapping via scanning electron diffraction using both pattern and vector matching." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The data was acquired from a GaAs nanowire displaying polymorphism between zinc blende and wurtzite structures." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This functionaility has been checked to run in pyxem-0.13.0 (Feb 2021). Bugs are always possible, do not trust the code blindly, and if you experience any issues please report them here: https://github.com/pyxem/pyxem-demos/issues" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Load & Inspect Data\n", "2. Pre-processing\n", "3. Template matching\n", " 1. [Build Template Library]\n", " 2. [Indexing]\n", "4. Vector Matching\n", " 1. [Build Vector Library]\n", " 2. [Indexing Vectors]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import pyxem and other required libraries" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING:silx.opencl.common:Unable to import pyOpenCl. Please install it from: https://pypi.org/project/pyopencl\n" ] } ], "source": [ "%matplotlib inline\n", "\n", "import numpy as np\n", "import diffpy.structure\n", "import pyxem as pxm\n", "import hyperspy.api as hs\n", "\n", "accelarating_voltage = 200 # kV\n", "camera_length = 0.2 # m\n", "diffraction_calibration = 0.032 # px / Angstrom" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Loading and Inspection" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load the demo data" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/carterfrancis/mambaforge/envs/pyxem-dev/lib/python3.11/site-packages/hyperspy/misc/utils.py:471: VisibleDeprecationWarning: Use of the `binned` attribute in metadata is going to be deprecated in v2.0. Set the `axis.is_binned` attribute instead. \n", " warnings.warn(\n", "/Users/carterfrancis/mambaforge/envs/pyxem-dev/lib/python3.11/site-packages/hyperspy/io.py:572: VisibleDeprecationWarning: Loading old file version. The binned attribute has been moved from metadata.Signal to axis.is_binned. Setting this attribute for all signal axes instead.\n", " warnings.warn('Loading old file version. The binned attribute '\n" ] }, { "data": { "text/html": [ "
\n",
"
| \n",
" \n",
"
| \n",
"